/*
 * Copyright (c) 2010 CCX(China) Co.,Ltd. All Rights Reserved.
 *
 * This software is the confidential and proprietary information of
 * CCX(China) Co.,Ltd. ("Confidential Information").
 * It may not be copied or reproduced in any manner without the express 
 * written permission of CCX(China) Co.,Ltd.
 *
 * @author Administrator
 * Date: 2010-7-6 上午11:06:48
 */
package com.ccxe.manage.service.impl;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import com.ccxe.manage.dao.impl.RoleDaoImpl;
import com.ccxe.manage.model.RoleBean;

/**
 * @author wangyx
 * 
 */
public class RoleDaoService {

	private RoleDaoImpl dao = new RoleDaoImpl();

	public List<Map<?, ?>> queryAll() throws Exception {
		return dao.queryAll();
	}
	public List<RoleBean> getByCondition() {
		List<RoleBean> list=new ArrayList<RoleBean>();
		try {
			list=dao.getByCondition();
			if(list!=null&&list.size()>0) return list;
		} catch (Exception e) {
			e.printStackTrace();
		}
		return null;
	}
	public int insertOne(Object[] values) {
		try {
			return dao.insertOne(values);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return 0;
	}

	public int update(Object[] values) {
		try {
			return dao.update(values);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return 0;
	}

	public int delete(String roleId) {
		try {
			return dao.delete(roleId);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return 0;
	}

}
